package cn.itcast.service;

import cn.itcast.dao.UserDao;
import com.itheima.pojo.User;

import java.sql.SQLException;
import java.util.List;

public class UserService {

    private UserDao userDao = new UserDao();

    public List<String> search(String keyword){
        List<String> list = null;


        try {
            list= userDao.search(keyword);
        } catch (SQLException e) {
            e.printStackTrace();
            System.out.println("service要处理 dao层的异常 这可以理解为是一种业务");
        }

        return list;
    }
}
